const TokenKey = 'App-Token'
const tokenUser = 'App-User'

export function getToken() {
  return uni.getStorageSync(TokenKey)
}

export function setToken(token) {
  return uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
  return uni.removeStorageSync(tokenUser)
}
export function setUser(user) {
  return uni.setStorageSync(tokenUser,JSON.stringify(user))
}
export function getUser() {
  let user = uni.getStorageSync(tokenUser);
  return JSON.parse(user);
}
export function removerUser() {
  return uni.removeStorageSync(tokenUser)
}

